package br.gov.cemaden.library.model.alerta.automatico;

import br.gov.cemaden.library.interfaces.alerta.automatico.CondicaoInterface;

/**
 *
 * @author alan.oliveira
 */
public abstract class BaseCondicao implements CondicaoInterface {
    
    protected Integer id;
    
    protected String descricao;

    public BaseCondicao() {}        
    
    public void setId(Integer id) {
        this.id = id;
    }    

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    } 

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 83 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BaseCondicao other = (BaseCondicao) obj;
        return this.id == other.id || (this.id != null && this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "BaseCondicao{" + "descricao=" + descricao + '}';
    }        
    
}
